package Entities

import "time"

type Comment struct {
	ID       int       `gorm:"primaryKey;autoIncrement" json:"id"`
	Av       string    `gorm:"type:varchar(20);index;not null" json:"av"`
	Username string    `gorm:"type:varchar(50);not null" json:"username"`
	Content  string    `gorm:"type:text;not null" json:"content"`
	Created  time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP" json:"created"`
	Deleted  bool      `gorm:"type:tinyint(1);default:0" json:"deleted"`
}

func (Comment) TableName() string {
	return "comments"
}
